Fix bug registering component with static view.is
prop but no view.file
prop
#627
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There are many ways that components can define their view files. The usual way is for the component class to directly point to its view file, such as via a static
view.file
property.One lesser-used way is to infer the view name based off the component name.
In this example below, the component doesn't explicitly define a view file. So on component registration, Derby looks for a previously registered view named "simple-box".
That inference isn't working when registering via
app.component(SimpleBox)
, but it does work with the older signature that passes a custom component name in the call,app.component('simple-box', SimpleBox)
.This fixes the inference in the first case, where Derby reads the component name off of the class directly.